<template>
  <svg class="svg-icon" aria-hidden="true">
    <use :xlink:href="icon"></use>
  </svg>
</template>
<script setup>
  import '@/assets/icon/iconfont.js';
  import { reactive, toRef, ref, computed, getCurrentInstance } from 'vue';
  const props = defineProps({
    iconName: { type: String, default: 'icon-tupian' },
  });
  let icon = computed({
    get: () => {
      return '#icon-' + props.iconName;
    },
    set: newVal => {
      icon = newVal;
    },
  });
</script>
<style>
  .svg-icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.15em;
    fill: currentColor;
    overflow: hidden;
  }
</style>
